package cc.codeshop.activityservice;

import android.os.Binder;

public class LogicInterface extends Binder implements ILogicInterface {
	
	private ServiceListener listener;

	@Override
	public long invokeSimpleParam(int d, float f, boolean b, String s) {
		System.out.println(String.format("a = %d, b = %f, c = %b, d = %s",  d, f, b, s));
		listener.onServiceUpdate(1001, "Hello");
		return 555L;
	}

	@Override
	public void invokeWithCallback(String s, ICallback callback) {
		System.out.println("invokeWithCallback : " + s);
		callback.onInvokeFinished(200, "Invoke come back.");
		listener.onServiceUpdate(1002, callback);
	}

	@Override
	public void setServiceListener(ServiceListener listener) {
		this.listener = listener;
	}

}
